<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--<link rel="stylesheet" href="/cp/Public//css/public.css">-->

    <!-- Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <!--<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>-->
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>


    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <!--<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
    <script type="text/javascript" src="/cp/Public//js/common.js"></script>
    <script type="text/javascript" src="/cp/Public//js/d3.min.js"></script>

    <!--日期控件-->
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>



    <style type="text/css" media="screen">
        body {
            padding-top: 20px;
            padding-left: 50px;
            padding-right: 50px;
        }
    </style>

    <script type="text/javascript">
        $(function () {

            $("#datepicker-start").datepicker({
                dateFormat: 'yy-mm-dd',
                showButtonPanel: true,

            });

        })


    </script>
</head>


   



<body>
    <script>
        $(function () {

            $(".datepicker-start").datepicker({
                dateFormat: 'yy-mm-dd',
                showButtonPanel: true,

            });

        })
        function trClick(start,end, channel, tag,fee) {
            if (tag == 1) {
                showModalDialog("<?php echo U('small/upinfo_',array('timeStamp'=>time()));?>" + "/start/" + start+"/end/"+end + "/channel/" + channel+"/fee/"+fee , "上行详情", "dialogWidth:800px;dialogHeight:600px; dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes;toolbar=no");
            } else if (tag == 2) {
                showModalDialog("<?php echo U('small/successinfo_',array('timeStamp'=>time()));?>" + "/start/" + start+"/end/"+end + "/channel/" + channel+"/fee/"+fee , "上行详情", "dialogWidth:800px;dialogHeight:600px; dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes;toolbar=no");
            }else if (tag==3){
                showModalDialog("<?php echo U('small/syncinfo_',array('timeStamp'=>time()));?>" + "/start/" + start+"/end/"+end +"/channel/" + channel+"/fee/"+fee , "上行详情", "dialogWidth:800px;dialogHeight:600px; dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes;toolbar=no");

            }else if (tag==4){
                showModalDialog("<?php echo U('small/codeinfo_',array('timeStamp'=>time()));?>" + "/start/" + start+"/end/"+end + "/channel/" + channel+"/fee/"+fee , "上行详情", "dialogWidth:800px;dialogHeight:600px; dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes;toolbar=no");

            }

        }
    </script>
    日期：
    <form action="<?php echo U('small/list_');?>">
        开始:<input class="datepicker-start" type="text" name="start" value="<?php echo ($start); ?>"/>
        结束:<input class="datepicker-start" type="text" name="end" value="<?php echo ($end); ?>"/><br/>

        <input type="submit" value="统计" class="btn btn-default">

    </form>
    <table class="table table-bordered table-hover definewidth m10">
        <thead>
            <tr>
                <th>日期</th>
                <th>渠道号</th>
                <td>价格</td>
                <th>上行数</th>
                <th>验证码请求数</th>
                <th>验证码请求成功数</th>

                <th>成功数</th>

                <th>同步成功数</th>

                
            </tr>
        </thead>
        <tbody>
            <?php if(is_array($data)): foreach($data as $key=>$vo): ?><tr>
                    <td><?php echo ($vo["today"]); ?></td>
                    <td><?php echo ($vo["channel"]); ?></td>
                    <td><?php echo ($vo["fee"]); ?></td>
                    <td onclick="trClick('<?php echo ($start); ?>','<?php echo ($end); ?>','<?php echo ($vo["channel"]); ?>','1','<?php echo ($vo["fee"]); ?>')"><?php echo ($vo["up_count"]); ?></td>
                    <td onclick="trClick('<?php echo ($start); ?>','<?php echo ($end); ?>','<?php echo ($vo["channel"]); ?>','4','<?php echo ($vo["fee"]); ?>')"><?php echo ($vo["code_count"]); ?></td>
                    <td><?php echo ($vo["code_success_count"]); ?></td>

                    <td onclick="trClick('<?php echo ($start); ?>','<?php echo ($end); ?>','<?php echo ($vo["channel"]); ?>','2','<?php echo ($vo["fee"]); ?>')"> <?php echo ($vo["success_count"]); ?></td>
                    <td onclick="trClick('<?php echo ($start); ?>','<?php echo ($end); ?>','<?php echo ($vo["channel"]); ?>','3','<?php echo ($vo["fee"]); ?>')"><?php echo ($vo["sync_count"]); ?></td>



                </tr><?php endforeach; endif; ?>
        </tbody>
    </table>
    <?php echo ($page); ?>
</body>

</html>